package com.ylesb.ioc;
/**
 * @title: OkhttpStaticFactory
 * @projectName springdemo
 * @description: TODO
 * @author White
 * @site : [www.ylesb.com]
 * @date 2022/7/616:31
 */

import okhttp3.OkHttpClient;

/**
 * @className    : OkhttpStaticFactory
 * @description  : [描述说明该类的功能]  
 * @author       : [XuGuangchao]
 * @site         : [www.ylesb.com]
 * @version      : [v1.0]
 * @createTime   : [2022/7/6 16:31]
 * @updateUser   : [XuGuangchao]
 * @updateTime   : [2022/7/6 16:31]
 * @updateRemark : [描述说明本次修改内容] 
 */

public class OkhttpStaticFactory {
    private static OkHttpClient okHttpClient;
    public static OkHttpClient getInstance(){
        if (okHttpClient==null)
        {
            okHttpClient=new OkHttpClient.Builder().build();
        }
        return  okHttpClient;
    }
}
